'use strict';
const db = uniCloud.database()
exports.main = async (event, context) => {
	const collection = db.collection('banner')
	let res =null;
	if(event.action=="add"){
		res = await collection.add(event.data)
	}else if(event.action=="get"){
		res = await collection.get()
	}
	return res
};

